package com.example.repository;

import com.example.entity.Student;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.data.rest.core.annotation.RestResource;

import java.util.List;

public interface StudentRepository extends JpaRepository<Student,Integer> {
    @RestResource(path = "snameStartsWith",rel = "snameStartsWith")
    List<Student> findBySnameStartsWith(@Param("sname") String sname);
}